<?php

    //$_load_controls_template = include('template.php');

    // Template controls
    $_load_controls = array(
        "menus"    => NULL,
        "controls" => NULL,
        "langs"    => NULL,
        "privacy"  => NULL,
        "social"   => NULL,
    );


    $message = 'Γεια σου   '.Auth::get_username().' &nbsp;' . '<a class="btn btn-large" href="?page=admin_advert/advert_data&id_ad=0"><i class="icon-plus-sign"></i> Kαταχώρηση νέας αγγελίας </a>';



    $_load_controls["login"] = isset($_SESSION['Auth']) ? $message.'<a class="btn btn-large" href="?page=signin&cmd=logout"><i class="icon-star"></i> Αποσύνδεση </a>' : NULL;

    /**
     *
     *   Main Page Menus
     *
     */
    $_tmp = array(
        //   'Αρχική'      => 'main',
        'Αναζήτηση'  => 'search',
        'Καρτέλα Χρήστη'  =>  'user_panel',
        'Αγγελίες Χρήστη'  =>  'user_panel_aggelies',
        'Όροι Χρήσης' => 'terms',
        'Περί'        => 'about',
    );

    $link = Controller::$_page['run'];

    while (list($key, $value) = each($_tmp)) {

        $_active = strcmp($link, $value) == 0 ? ' class="active" ' : NULL;
        $_load_controls["menus"] .= '<li ' . $_active . '><a  href="?page=' . $value . '" title="' . $key . '">' . $key . ' </a></li>';
    }


    /*
    $_langs = array(
        'English'  => 'cy-GB.gif',
        'Ελληνικά' => 'el-GR.gif',
    );


    while (list($key, $value) = each($_langs))
        $_load_controls["langs"] .= '<a   href="?page=lang&set=' . $key . '"><span class="Language selected" title="' . $key . '" style="background-image: url(Media/images/' . $value . ')"> &nbsp;  </span></a>';
    */


    $_load_controls_template = array(
        'controls' => $_load_controls["controls"],
        'menus'    => $_load_controls["menus"],
        'langs'    => $_load_controls["langs"],
        'social'   => $_load_controls["social"],
        'privacy'  => $_load_controls["privacy"],
        'login'    => $_load_controls["login"],
    );



    return $_load_controls_template;